/**
 *
 */
Ext.define('vacake.view.Register', {
    extend: 'Ext.form.Panel',
    xtype: 'registerForm',
    requires: [
            'Ext.form.Panel',
            'Ext.form.FieldSet',
            'Ext.field.Password',
            'Ext.field.Hidden'
    ],

    id: 'registerForm',

    config: {
        style:'background:#EEEAE0',
        scrollable: true,
        layout: 'vbox',
        items: [{
                docked: 'top',
                xtype: 'titlebar',
                title: '注册',
                items: [{
                        text: '返回',
                        action: 'reg_back_parent',
                        ui: 'action-back'
                    }
                ]
            }, {
                margin: '20px auto 0px auto',
                xtype: 'image',
                src: 'resources/images/project_logo.png',
                height: 103,
                width: 194
            }, {
                cls: 'fenge'
            }, {
                xtype: 'fieldset',
                id: 'reg_field',
                items: [{
                        xtype: 'textfield',
                        name: 'mobile_num',
                        id: 'mobile_num',
                        placeHolder: '手 机 号',
                        autoCapitalize: true,
                        required: true
                    }, {
                        xtype: 'passwordfield',
                        name: 'password',
                        id: 'password',
                        placeHolder: '密    码',
                        required: true
                    }, {
                        xtype: 'passwordfield',
                        name: 'repassword',
                        id: 'repassword',
                        placeHolder: '确认密码',
                        required: true
                    }, {
                        xtype: 'hiddenfield',
                        name: 'caid',
                        id: 'hidden_caid'
                    }
                ]
            }, {
                xtype: 'fieldset',

                items: [{
                        xtype: 'checkboxfield',
                        name: 'showPassword',
                        style: 'padding:0 0 10px 5px;',
                        id: 'reg_show_password',
                        label: '显示密码'
                    }, {
                        xtype: 'button',
                        ui: 'confirm',
                        text: '注册',
                        style: 'height:45px;',
                        action: 'registerSubmit'
                    }
                ]
            }
        ],
        listeners: {
            painted: function() {
                Ext.Viewport.unmask();
            },
            back: function() {
                var backid = Ext.Viewport.getInnerItems().length - 2;
                Ext.Viewport.remove(Ext.Viewport.getActiveItem(), true);
                Ext.Viewport.setActiveItem(backid);
            }
        }
    }
});